﻿using Microsoft.EntityFrameworkCore;

namespace StudentManegement.Models
{
    public static class ModelBuilderExtensions
    {
        public static void Seed(this ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<StudentModel>().HasData(
                new StudentModel
                {
                    Id = 1,
                    Name = "种子",
                    ClassName = "初三二班",
                    EmailAddress = "2601892901@qq.com",
                },
                new StudentModel
                {
                    Id = 2,
                    Name = "JoJoC",
                    ClassName = "高一八班",
                    EmailAddress = "jojoc@163.com",
                    Major = MajorEnum.SecondGrade
                }
                );
        }
    }
}
